package com.api.phm.mapper;

import com.api.common.domain.model.RuleLatestDataQuery;
import com.api.phm.domain.query.AlarmLogQuery;
import com.api.phm.domain.query.alarmRule.AlarmRuleQuery;
import com.api.phm.domain.vo.AlarmLogVo;
import com.api.phm.domain.vo.AlarmRuleQueryListVo;
import com.api.phm.domain.vo.AlarmRuleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AlarmRuleMapper {
    List<AlarmRuleQuery> searchList(@Param("vo") AlarmRuleVo alarmRuleVo);

    List<AlarmRuleQuery> searchList2(@Param("vo") AlarmRuleQueryListVo alarmRuleVo);

    AlarmRuleQuery searchItem(@Param("vo") AlarmRuleVo alarmRuleVo);

    List<AlarmLogQuery> searchAlarmLog(@Param("vo") AlarmLogVo alarmLogVo);

    AlarmLogQuery searchAlarmLogItem(@Param("vo") AlarmLogVo alarmLogVo);

    Long add(@Param("vo") AlarmRuleVo alarmRuleVo);

    Long addAlarmLog(@Param("vo") AlarmLogVo alarmLogVo);

    void updateAlarmReadMark(@Param("alarmId") Long alarmId);

    void update(@Param("vo") AlarmRuleVo alarmRuleVo);

    void deleteItem(@Param("id") Long ruleId);

    void addCacheRule(@Param("items") List<RuleLatestDataQuery> ruleItemNewsModels);

    List<RuleLatestDataQuery> getCacheRule();
}
